package cn.edu.xjtu.data_structure.chapter02_stack_queue.stack;

/**
 * @author yjq
 * @version 1.0
 * @date 2021/9/11 19:04
 */
public class LStackTest {
    public static void main(String[] args) {
        LStack<Integer> myAStack=new LStack<>();
        myAStack.push(1);
        myAStack.push(2);
        myAStack.push(3);
        myAStack.push(4);
        myAStack.push(5);
        System.out.println("after pushing, the stack is: ");
        myAStack.print();
        System.out.print("top value: ");
        System.out.println(myAStack.topValue());
        System.out.println("after popping two elements: ");
        myAStack.pop();
        myAStack.pop();
        myAStack.print();
        System.out.print("top value: ");
        System.out.println(myAStack.topValue());
    }
}
